
package vv.lines;

import vv.lines.core.Game;
import vv.lines.core.context.ContextBuilder;
import vv.lines.core.context.IContext;

import javax.swing.*;
import java.util.logging.Level;
import java.util.logging.Logger;


/**
 *
 * @author vpotapenko
 */
public class Main {

    // default game config
    private static final int MAX_VALUE = 7;
    private static final int GENERATE_COUNT = 3;
    private static final int CLEARABLE_SIZE = 5;
    private static final int COLUMN_COUNT = 9;
    private static final int ROW_COUNT = 9;
    private static final int MAX_CHAMPIONS = 7;

    public static void main(String[] args) {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
            Logger.getLogger(Main.class.getName()).
                    log(Level.SEVERE, null, e);
        }

        final ContextBuilder contextBuilder = new ContextBuilder();
        contextBuilder.init(MAX_VALUE, ROW_COUNT, COLUMN_COUNT, CLEARABLE_SIZE, MAX_CHAMPIONS,
                GENERATE_COUNT);
        final IContext context = contextBuilder.createContext();
        Game game = new Game(context);
        game.start();
    }
}
